package com.jeeplus.modules.web.wx;

import com.jeeplus.common.config.Global;
import com.jeeplus.core.web.BaseController;
import com.jeeplus.modules.monitor.model.Message;
import com.jeeplus.modules.monitor.utils.Business;
import com.jeeplus.modules.monitor.utils.FileBean;
import com.jeeplus.modules.monitor.utils.MoneyTest;
import com.jeeplus.modules.web.entity.wx.YsUser;
import com.jeeplus.modules.web.mapper.WxFeedbackMapper;
import com.jeeplus.modules.web.mapper.WxUserMapper;
import com.jeeplus.modules.web.mapper.WxUserWalletMapper;

import net.sf.json.JSONObject;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by rongj on 2017/8/6.
 */
@Controller
@RequestMapping(value = "/wx/feedback")
public class YjFeedbackController extends BaseController {
    @Autowired
    WxUserMapper wxUserMapper;
    @Autowired
    WxUserWalletMapper wxUserWalletMapper;
    @Autowired
    WxFeedbackMapper wxFeedbackMapper;

    /**
     *
     * @return
     */
    @RequestMapping("/add")
    @ResponseBody

    public Map<String,Object> addFeedback( String text,String userToken ){
        Map<String,Object> map=new HashMap<String, Object>();
        YsUser wxUserInfo=wxUserMapper.getWxUserInfo(userToken);

        map.put("add",wxFeedbackMapper.addFeedback(wxUserInfo.getId(),text));

        return  map;

    }
    }
